<template>
	<w-dailog
		v-model="dialogImportErrorVisible"
		width="550px"
		:title="title"
		:showMoreBtn="false"
	>
		<w-table
			ref="errorListTable"
      :showTools="false"
      :selectable="false"
			:tableColumn="tableColumn"
			:listData="tableData"
      :showIndex="true"
			:showColumnFilterBtn="false"
      :showPagination="false"
      :wrap="true"
		>
    </w-table>
    <template slot="footer">
			<el-button @click="onCancelClick">取消</el-button>
		</template>
	</w-dailog>
</template>
<script>
export default {
	name: 'ImporterrorInfo',
	props: {
		errorMsg: {
			type: Array,
			default: () => {
				return []
			}
		}
	},
	data () {
		return {
			title: '失败原因',
			tableColumn: [
				{ prop: 'errorMsg', label: '失败原因', required: true }
			],
			tableData: [],
			dialogImportErrorVisible: false
		}
	},
	methods: {
		open () {
			this.dialogImportErrorVisible = true
			this.$nextTick(() => {
				this.tableData = this.errorMsg
			})
		},
		// 取消
		onCancelClick () {
			this.dialogImportErrorVisible = false
		}
	}
}
</script>
<style lang="stylus" scoped>
@import '~$assets/stylus/varsty.styl'
.organ-manage-container {
	flex: 1;
	display:flex
	flex-direction: column
	overflow: auto
	.tools-left, .tools-right {
		display:flex
		flex-direction: row
		align-items: center
	}
	.tools-left {
		flex: 1
	}
	.buttonMore {
		margin: 0 10px
	}
  .fx-list-table__cell-span {
		white-space: normal !important
  }
}
</style>
